"""
URL configuration for djangoProject1 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from workDjango.views import host, data_show, work01, work02, work03, work04, user_login_logout, home, user_manage,work_customize

urlpatterns = [
    # path("admin/", admin.site.urls),

    # 系统首页
    path('system/home', home.home),
    # 主页面
    path('system/host', host.host_show),

    # 数据管理
    # 1.商品数据展示
    path('system/data_show', data_show.goods_show),
    # 2.商品数据修改
    path('system/data_show/update/<str:table_choice>/<str:id>', data_show.goods_update),

    # 3.商品数据删除
    path('system/data_show/delete/<str:table_choice>/<str:id>', data_show.goods_delete),
    # 4.商品数据添加
    # path('system/data_show/add', data_show.goods_add_choice),
    path('system/data_show/add', data_show.goods_add),

    # 数据可视化
    # 1.厨具销售详情可视化
    path('system/work01', work01.show),
    path('system/work01/goods_sales_show', work01.goods_sales_show),
    # 2.不同类型商品销量可视化
    path('system/work02', work02.category_show),
    path('system/work02/goods_sales_type_show', work02.goods_sales_type_show),
    # 3.不同品牌商品可视化
    path('system/work03', work03.show_brand),
    path('system/work03/goods_sale_brand_show', work03.goods_sale_brand_show),
    # 4.商品好评率可视化
    path('system/work04', work04.store_show),
    path('system/work03/goods_sale_store_show', work04.goods_sale_store_show),

    # # 上传文件，自定义可视化
    path('system/customize/upload', work_customize.upload_file, name='upload_file'),
    path('system/customize/show_data', work_customize.show_data, name='show_data'),
    path('system/customize/visualization', work_customize.visualization),
    path('system/customize/visualization_show', work_customize.visualization_show),
    # path('system/customize', work_customize.customize),
    # #1.上传文件地址
    # path('system/customize/upload_file', work_customize.upload_file),

    # 用户登陆，登出
    path('system/login', user_login_logout.login),
    path('system/logout', user_login_logout.logout),

    # 用户管理页面
    # 1.创建用户
    path('system/user_manage/create', user_manage.user_create),
    # 用户详情
    path('system/user_manage/detail', user_manage.user_detail),
    # 用户修改
    path('system/user_manage/update/<str:id>', user_manage.user_update),

]
